#include <wiringPi.h>
#include <wiringPiI2C.h>
#include <stdio.h>
#include "oled_iic.h"

int main()
{
    int i2c_fd;
    if(wiringPiSetup() != 0)
    {
        printf("wiringPi Setup Error\n");
        return -1;
    }

    i2c_fd = wiringPiI2CSetup(IIC_ADRR);

    OLED_Init(i2c_fd);  // 初始化OLED
    OLED_Clear(i2c_fd);

    // OLED_Show_Char(i2c_fd,0,2,'A',12);
    // OLED_Show_Char(i2c_fd,0,0,'A',24);
    // OLED_Show_String(i2c_fd,0,0,"HELLO",16);
    OLED_Show_String(i2c_fd,0,0,"HELLO",12);

    while(1); // 卡住
    return 0;
}